package com.shop.myweb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.myweb.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 11098
 * @description 针对表【goods(菜品管理)】的数据库操作Mapper
 * @createDate 2023-04-23 19:43:24
 * @Entity com.shop.myweb.entity.Goods
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {


    @Select("select * from goods order by RAND() limit 15;")
    List<Goods> selectRandomPage();

    @Select("select * from goods order by RAND() limit 4;")
    List<Goods> selectIndexRandomPage();
}




